package com.maimao.api.mall.shopping_cart;

import com.maimao.core.model.resp.Result;
import com.maimao.model.cart.ShoppingCart;
import com.maimao.model.cart.ShoppingCartVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;
import java.util.Map;

/**
 * @author MaoLin Wang
 * @date 2021/1/10 11:04 上午
 */
@Api(value = "购物车")
@RequestMapping("/mall/cart")
public interface ShoppingCartApi {

    @ApiOperation("合并离线购物车")
    public Result mergeCart(List<ShoppingCart> shoppingCartList, BindingResult bindingResult);

    @ApiOperation("添加购物车")
    public Result<?> addCart(ShoppingCart shoppingCart, BindingResult bindingResult);

    Result<?> querySku(Long skuId);

    Result<?> shoppingCartData();

    @ApiOperation("修改商品数量")
    Result<?> updateNum(ShoppingCart shoppingCart);

    @ApiOperation("删除购物车商品")
    Result<?> deleteCarBatch(List<Long> ids);

    @ApiOperation("清除当前用户的购物车的失效商品")
    Result<?> removeInvalidGoods();
}
